
package com.caration.shell.action;

import com.caration.shell.R;

import android.content.Context;

public final class Command {

    public static final byte CMD_NONE = 0;
    public static final byte CMD_APP_DRAWER = 1;
    public static final byte CMD_HOME_DESKTOP = 2;
    public static final byte CMD_SWITCH_DRAWER_HOME = 3;
    public static final byte CMD_TOGGLE_NOTIBAR = 4;
    public static final byte CMD_EXPAND_NOTIBAR = 5;
    public static final byte CMD_TOGGLE_MENU = 6;
    public static final byte CMD_EXPAND_MENU = 7;
    public static final byte CMD_TEXT_SEARCH = 8;
    public static final byte CMD_VOICE_SEARCH = 9;
    public static final byte CMD_SHELL_SETTING = 10;

    public int mActionId;
    public int mIconResId;
    public String mName;

    public Command(Context context, int id) {
        mActionId = id;
        int resourceId = 0;
        switch (id) {
            case CMD_NONE:
                resourceId = R.drawable.ic_action_none;
                break;
            case CMD_APP_DRAWER:
                resourceId = R.drawable.ic_action_drawer;
                break;
            case CMD_HOME_DESKTOP:
                resourceId = R.drawable.ic_action_homescreen;
                break;
            case CMD_SWITCH_DRAWER_HOME:
                resourceId = R.drawable.ic_action_drawer_homescreen;
                break;
            case CMD_TOGGLE_NOTIBAR:
                resourceId = R.drawable.ic_action_toggle_notification_bar;
                break;
            case CMD_EXPAND_NOTIBAR:
                resourceId = R.drawable.ic_action_expand_notification_bar;
                break;
            case CMD_TOGGLE_MENU:
                resourceId = R.drawable.ic_action_toggle_menu;
                break;
            case CMD_EXPAND_MENU:
                resourceId = R.drawable.ic_action_expand_shrink_menu;
                break;
            case CMD_TEXT_SEARCH:
                resourceId = R.drawable.ic_action_txtsearch;
                break;
            case CMD_VOICE_SEARCH:
                resourceId = R.drawable.ic_action_voice;
                break;
            case CMD_SHELL_SETTING:
                resourceId = R.drawable.ic_action_tsf_setting;
                break;
        }
        mIconResId = resourceId;
        mName = CommandsHelper.getNameFromId(context, id);
    }
}
